<?php
/**
 * Created by PhpStorm.
 * User: wincol
 * Date: 2018/3/24
 * Time: 19:52
 */

namespace App\Task;


use Hhxsv5\LaravelS\Swoole\Task\Task;

class AddRecordTask extends Task
{
    public $classArr;
    public $paramArr;
    public function __construct($classArr, $paramArr)
    {
        $this->classArr = $classArr;
        $this->paramArr = $paramArr;
    }
    public function handle()
    {
        foreach ($this->classArr as $k=>$v){
            (new $v)->create($this->paramArr[$k]);
        }
    }
}